<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>平台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__STATIC__/res/layui/css/layui.css" media="all">
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 10px 30px 0 10px;">

    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">基础</li>
            <li>域名</li>
            <li>数据库</li>
            <li>权限</li>
            <li>加速</li>
        </ul>

        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 企业</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="enterprise_id" value="{$website['enterprise_id']}">
                        <input type="text" name="name"  readonly disabled autocomplete="off" class="layui-input" value="{$enterprise_name}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 站点名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" lay-verify="required" placeholder="请输入站点名称" lay-reqtext="请输入站点名称" autocomplete="off" class="layui-input" value="{$website['name']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">站点标识</label>
                    <div class="layui-input-block">
                        <input type="text" name="code" disabled readonly placeholder="请输入站点标识"  autocomplete="off" class="layui-input" value="{$website['code']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 状态</label>
                    <div class="layui-input-block">
                        <input type="checkbox" {if $website['status'] eq 1}checked{/if}  lay-verify="required" lay-filter="status" name="status" lay-skin="switch" lay-text="启用|禁用" value="1">
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 站点域名</label>
                    <div class="layui-input-block">
                        <input type="text" name="domain" lay-verify="required" placeholder="请输入站点域名" autocomplete="off" class="layui-input" value="{$website['domain']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 前台地址</label>
                    <div class="layui-input-block">
                        <input type="text" name="frontend_url" lay-verify="required" placeholder="请输入站点前台访问地址" autocomplete="off" class="layui-input" value="{$website['frontend_url']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 后台地址</label>
                    <div class="layui-input-block">
                        <input type="text" name="backend_url" lay-verify="required" placeholder="请输入站点后台访问地址" autocomplete="off" class="layui-input" value="{$website['backend_url']}">
                    </div>
                </div>
            </div>

            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 数据库地址</label>
                    <div class="layui-input-block">
                        <input type="text" name="db_host" lay-verify="required" placeholder="请输入数据库地址" autocomplete="off" class="layui-input" value="{$website['db_host']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 数据库端口</label>
                    <div class="layui-input-block">
                        <input type="text" name="db_port" lay-verify="required" placeholder="请输入数据库端口" autocomplete="off" class="layui-input" value="{$website['db_port']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 数据库用户</label>
                    <div class="layui-input-block">
                        <input type="text" name="db_user" lay-verify="required" placeholder="请输入数据库用户" autocomplete="off" class="layui-input" value="{$website['db_user']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 数据库名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="db_name" lay-verify="required" placeholder="请输入数据库名称" autocomplete="off" class="layui-input" value="{$website['db_name']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">数据表前缀</label>
                    <div class="layui-input-block">
                        <input type="text" name="db_prefix" placeholder="请输入数据表前缀" autocomplete="off" class="layui-input" value="{$website['db_prefix']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"> 数据库密码</label>
                    <div class="layui-input-inline">
                        <input type="password" name="db_password" placeholder="请输入数据库密码" autocomplete="off" class="layui-input" >
                    </div>
                    <div class="layui-form-mid layui-word-aux"> 不输入，则不修改密码</div>
                </div>
            </div>

            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 应用ID</label>
                    <div class="layui-input-block">
                        <input type="text" name="app_id" lay-verify="required" placeholder="请输入app id" autocomplete="off" class="layui-input" value="{$website['app_id']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> 应用密钥</label>
                    <div class="layui-input-block">
                        <input type="text" name="app_secret" lay-verify="required" placeholder="请输入app secret" autocomplete="off" class="layui-input" value="{$website['app_secret']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><span style="color: #FF5722">*</span> JWT密钥</label>
                    <div class="layui-input-block">
                        <input type="text" name="app_jwt_secret" lay-verify="required" placeholder="请输入app jwt secret" autocomplete="off" class="layui-input" value="{$website['app_jwt_secret']}">
                    </div>
                </div>
            </div>

            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <label class="layui-form-label">CDN Bucket </label>
                    <div class="layui-input-block">
                        <input type="text" name="cdn_bucket" placeholder="请输入 CDN Bucket" autocomplete="off" class="layui-input" value="{$website['cdn_bucket']}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">CDN 域名 </label>
                    <div class="layui-input-block">
                        <input type="text" name="cdn_domain" placeholder="请输入 CDN 域名" autocomplete="off" class="layui-input" value="{$website['cdn_domain']}">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item layui-hide">
        <input type="hidden" value="{$website['id']}" name="id" />
        <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" value="确认添加">
        <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" value="确认编辑">
    </div>
</div>

<script src="__STATIC__/res/layui/layui.js"></script>
<script>
    layui.config({
        base: '__STATIC__/res/' //静态资源所在路径
    }).use(['index', 'form'])
</script>
</body>
</html>